#ifndef GFXITEM_H
#define GFXITEM_H

#include "cliententity.h"
#include <QGraphicsItem>
#include <QList>
#include <QMap>
#include <QTime>

class GFXItem : public QGraphicsItem
{
public:
   typedef QList<GFXItem*> GFXItemListType;
   typedef QMap<qint32, GFXItem *> GFXItemMapType;

   explicit GFXItem(ClientEntity *entity=0, QGraphicsItem *parent = 0);
   GFXItem(const EntityBaseStats &stats, QGraphicsItem *parent=0);
   virtual ~GFXItem();
   virtual void setPulsate(bool show);
   virtual void setShowRange(bool show);
   virtual void setBlendRange(bool show);
   virtual void tick();
   QVariant itemChange(GraphicsItemChange change, const QVariant &value);
   void setEntity(ClientEntity *entity);
   ClientEntity* entity();
   bool active();
   void setActive(const bool active=true);
   void setSquadSize(const qint32 value);
   qint32 squadSize();
   EntityBaseStats stats();

protected:
   ClientEntity *mEntity;
   bool mActive;
   qint32 mTicksAlive;
   bool mShowRange;
   bool mBlendRange;
   bool mPulsate;
   qreal mPulsateScale;
   bool mPulsateCountUp;
   EntityBaseStats mStats;
   bool mUseEntity;
   qint32 mSquadSize;
   QTime mCreateTime;
};

#endif
